<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<div id="app">
  <!--  多重分支，不建议直接用标签，建议用计算属性去做-->
  <h2 v-if="score>=90">优秀</h2>
  <h2 v-else-if="score>=80">良好</h2>
  <h2 v-else-if="score>=60">及格</h2>
  <h2 v-else>不及格</h2>
  <hr>
  <hr>
  <h2>{{result}}</h2>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script>
  const app = new Vue({
    el:"#app",
    data:{
      message:"Hello zk !",
      score:95,
    },
    computed:{
      result(){
        let showMessage = '';
        if(this.score>=90){
          showMessage = '优秀';
        }
        else if(this.score>=80){
          showMessage = '良好';
        }
        else if(this.score>=60){
          showMessage = '及格';
        }
        else{
          showMessage = '不及格';
        }
        return showMessage;
      }
    }
  })
</script>
</body>
</html>
